//函数组件的state形式
import React, { useState } from 'react'
//useState我们称之为Hooks
export default function Hello () {
  //格式  const/let [变量名] = useState(初始值)
  const [count] = useState(0)
  const [bol] = useState(true)
  const [str] = useState('hello xiaozhu')
  const [arr] = useState([1, 2, 3])
  return (
    <div>
      {count}<br />
      {bol ? 1 : 2}
      <hr />
      {str}<br />
      {arr[2]}
    </div>
  )
}
